<html><head><title>confidence and prediction/tolerance intervals for glm</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="Rchm.css">
</head>
<body>

<table width="100%"><tr><td>intervals(modtools)</td><td align="right">R Documentation</td></tr></table><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="keyword" value="R:   intervals">
<param name="keyword" value="R:   intervals.glm">
<param name="keyword" value="R:   intervals.robclust">
<param name="keyword" value=" confidence and prediction/tolerance intervals for glm">
</object>


<h2>confidence and prediction/tolerance intervals for glm</h2>


<h3>Description</h3>

<p>
This method gives confidence and prediction/tolerance intervals for the expected values from a generalized linear model (object of class 'glm').
</p>


<h3>Usage</h3>

<pre>
intervals(object, ...)
## S3 method for class 'glm':
intervals(object, newdata, type = "response", interval = "confidence",
method = 1, level = 0.05, ...)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>object</code></td>
<td>
Object of class inheriting from '"glm"'</td></tr>
<tr valign="top"><td><code>newdata</code></td>
<td>
An optional data frame in which to look for variables with which to predict.  If omitted, the data values are used.</td></tr>
<tr valign="top"><td><code>type</code></td>
<td>
the type of prediction required (by defaut type="response")</td></tr>
<tr valign="top"><td><code>interval</code></td>
<td>
Type of interval calculation.</td></tr>
<tr valign="top"><td><code>method</code></td>
<td>
a numerical values (by default method=1). The option 'method = 1' gives intervals
based on the carry-over of the extreme values. The option 'method = 2' provides "direct" interval (see the section note for more details.</td></tr>
<tr valign="top"><td><code>level</code></td>
<td>
Tolerance/confidence level</td></tr>
<tr valign="top"><td><code>...</code></td>
<td>
further arguments passed to or from other methods</td></tr>
</table>

<h3>Details</h3>

<p>
~~ If necessary, more details than the description above ~~
</p>


<h3>Value</h3>

<p>
~Describe the value returned
If it is a LIST, use
</p>
<table summary="R argblock">
<tr valign="top"><td><code>comp1 </code></td>
<td>
Description of 'comp1'</td></tr>
<tr valign="top"><td><code>comp2 </code></td>
<td>
Description of 'comp2'</td></tr>
</table>
<p>

...</p>

<h3>Note</h3>

<p>
~~further notes~~
Several procedure can provide confidence (or prediction/tolerance) intervals. In the function intervals.glm,
we propose the two following procedures:
method 1: confidence and prediction intervals based on the carry-over of the extreme values.
This method is an extrapolation of the results obtained in the linear model.
for confidence intervals
</p><p align="center"><i>sigma = sqrt{x^tVCOVx}</i></p><p>
where
for prediction intervals
</p><p align="center"><i>sigma = sqrt{1+x^tVCOVx}</i></p><p>
where
method 2: "direct" confidence intervals
</p><p align="center"><i>hat{y} +- epsilon_{alpha}var(hat{y})sqrt{x^tVCOVx}</i></p><p>
where <i>var(hat{y})=psi var()</i>
</p>


<h3>References</h3>

<p>
~put references to the literature/web site here ~
</p>


<h3>See Also</h3>

<p>
<code><a onclick="findlink('stats', 'glm.html')" style="text-decoration: underline; color: blue; cursor: hand">glm</a></code>,<code><a onclick="findlink('stats', 'predict.glm.html')" style="text-decoration: underline; color: blue; cursor: hand">predict.glm</a></code>
</p>


<h3>Examples</h3>

<pre>
##---- Should be DIRECTLY executable !! ----
##-- ==&gt;  Define data, use random,
##--    or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (object, ...) 
{
    UseMethod("intervals")
  }
</pre>

<script Language="JScript">
function findlink(pkg, fn) {
var Y, link;
Y = location.href.lastIndexOf("\\") + 1;
link = location.href.substring(0, Y);
link = link + "../../" + pkg + "/chtml/" + pkg + ".chm::/" + fn;
location.href = link;
}
</script>


<hr><div align="center">[Package <em>modtools</em> version 1.0-7 <a href="00Index.html">Index</a>]</div>

</body></html>
